﻿using System;
namespace LimitlessConnector
{
  /// <summary>
  /// Interface for the RGBWConnector
  /// </summary>
  public interface IRGBWConnector
  {
    /// <summary>
    /// Decreases the speed of the program.
    /// </summary>
    /// <returns></returns>
    System.Threading.Tasks.Task DecreaseSpeed();
    /// <summary>
    /// Disables all.
    /// </summary>
    /// <returns></returns>
    System.Threading.Tasks.Task DisableAll();
    /// <summary>
    /// Disables the selected group.
    /// </summary>
    /// <param name="GroupNo">The group no. Valid values are 1 to 4.</param>
    /// <returns></returns>
    /// <exception cref="System.NotSupportedException">Only group numbers 1 to 4 are supported.</exception>
    System.Threading.Tasks.Task DisableGroup(int GroupNo);
    /// <summary>
    /// Enables all groups.
    /// </summary>
    /// <returns></returns>
    System.Threading.Tasks.Task EnableAll();
    /// <summary>
    /// Enables the selected group.
    /// </summary>
    /// <param name="GroupNo">The group no. Valid values are 1 to 4.</param>
    /// <returns></returns>
    /// <exception cref="System.NotSupportedException">Only group numbers 1 to 4 are supported.</exception>
    System.Threading.Tasks.Task EnableGroup(int GroupNo);
    /// <summary>
    /// Enables the pre-configured program mode.
    /// </summary>
    /// <returns></returns>
    System.Threading.Tasks.Task EnableProgramMode();
    /// <summary>
    /// Gets a value indicating whether the connector already [has network settings].
    /// </summary>
    /// <value>
    ///   <c>true</c> if [has network settings]; otherwise, <c>false</c>.
    /// </value>
    bool HasNetworkSettings { get; }
    /// <summary>
    /// Increases the speed of the program.
    /// </summary>
    /// <returns></returns>
    System.Threading.Tasks.Task IncreaseSpeed();
    /// <summary>
    /// Sets the brightness.
    /// </summary>
    /// <param name="GroupNo">The group no. Values from 1 to 4 are valid.</param>
    /// <param name="Brightness">The brightness. Values from 2 to 27 are valid.</param>
    /// <returns></returns>
    /// <exception cref="System.NotSupportedException">
    /// Only group numbers 1 to 4 are supported.
    /// or
    /// Only brightness-values from 2 to 27 are supported.
    /// </exception>
    System.Threading.Tasks.Task SetBrightness(int GroupNo, int Brightness);
    /// <summary>
    /// Sets the color for the specified group.
    /// </summary>
    /// <param name="GroupNo">The group no. Valid values are 1 to 4.</param>
    /// <param name="Color">The color. Valid values are 0 to 255.</param>
    /// <returns></returns>
    /// <exception cref="System.NotSupportedException">
    /// Only group numbers 1 to 4 are supported.
    /// or
    /// Only color values between 0 and 255 are supported.
    /// </exception>
    System.Threading.Tasks.Task SetColor(int GroupNo, int Color);
    /// <summary>
    /// Enables the white LEDs in the bulb for all groups
    /// </summary>
    /// <returns></returns>
    System.Threading.Tasks.Task SetWhite();
    /// <summary>
    /// Enables the white LEDs in the bulb for the selected group
    /// </summary>
    /// <param name="GroupNo">The group no. 1 to 4 are valid values.</param>
    /// <returns></returns>
    /// <exception cref="System.NotSupportedException">Only group numbers 1 to 4 are supported.</exception>
    System.Threading.Tasks.Task SetWhite(int GroupNo);
    /// <summary>
    /// Updates the bridges network-settings.
    /// </summary>
    /// <param name="HostName">Name of the host.</param>
    /// <param name="Port">The port.</param>
    void UpdateBridgeSettings(string HostName, string Port);
  }
}
